import React from 'react';
import { inject, observer } from 'mobx-react';
import { Spin, Checkbox } from 'antd'
import { WeaRightMenu, WeaLocaleProvider,WeaDialog } from 'ecCom';
import { WeaTableNew } from "comsMobx";

const WeaTable = WeaTableNew.WeaTable;
const getLabel = WeaLocaleProvider.getLabel;


/**
 * 考核设置-考核指标项
 * jiansong 2019/6/18
 */
@inject("blogContentExportStore")
@observer
export default class ExportList2 extends React.Component {

    constructor(props) {
        super(props);
        this.state = {
            title: '', 
        }
        this.store = this.props.blogContentExportStore;
    }

    // componentDidMount() {
    //     const { blogContentExportStore } = this.props;
    //     let params ={timeRange:'1',userRange:'1',submitStatus:'3'}
    //     blogContentExportStore.getTableDatas2(params);
    //   }
    render() {
        let _this=this;
        const { loading,tableStore2,submitStatus } = _this.store;
        return (
            <Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@7bo2wq`} spinning={loading}>
                <div>
               
                <WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@197tf8`}
                    comsWeaTableStore={tableStore2}
                    needScroll
                    getColumns={this.getColumns}
                />
                
                
                </div>
            </Spin>
        )
    }

    getColumns = columns => {
        const { setExportLogDetailIsShow } = this.store;
        return columns.map(col => {
            if (col.dataIndex == "createdate") {
                col.render = (text, data) =>data.createdatespan+' '+ data.createtimespan
            } 
            return col;
        });
    }
}